function main() {
    debugger

    let div = document.createElement("div")
    let div2 = document.createElement("div")
    let span = document.createElement("span")
    span.setAttribute("id", "oldSpan");
    div.append(div2)
    div.append(span)
    console.log(div.outerHTML)
    div2.outerHTML = '<span id="newSpan"></span><p style="width:300px; color:yellow; background-color:red; text-align:center;"></p>'
    console.log(div.outerHTML)
}